<extend name="Index:index" />
    <block name="nav1">
        <ul class="breadcrumb">
            <li>
                <i class="icon-home home-icon"></i>
                <a href="#">Admin</a>
            </li>
            <li class="active">用户管理</li>
        </ul><!-- .breadcrumb -->
    </block>

    <block name="nav2">
        <h1>
        角色-权限管理
            <small>
                <i class="icon-double-angle-right"></i>
                角色信息列表
            </small>
        </h1>
    </block>
    <block name="main">
        <div class="row">
            <div class="col-xs-12">
                <table class="table auser">
                    <thead>
                        <tr>
                            <th>id</th>
                            <th>角色名</th>
                            <th>角色说明</th>
                            <th>当前状态</th>
                            
                            <th>操作</th>
                        </tr>
                    </thead>
                    <tbody>
                        <volist name="role_list" id="v">
                            <tr>
                                <td><{$v.id}></td>
                                <td><{$v.rname}></td>
                                <td><{$v.remark}></td>
                                <td><{$v['type'] == 1?'正常':'禁用'}></td>
                              
                                <td>
                                    <a href="<{:U('Role/del',array('id'=>$v['id']))}>" id="del" class="btn btn-danger btn-sm a">删除</a>
                                    <a href="<{:U('Role/edit',array('id'=>$v['id']))}>" class="btn btn-warning btn-sm a">修改</a>
                                    <a href="<{:U('Role/powerlist',array('id'=>$v['id']))}>" class="btn btn-info btn-sm a">权限分配</a>
                                </td>
                            </tr>
                        </volist>
                    </tbody>

                </table>
            </div>
        </div>
        <script>
        var btn = document.getElementById('del');
        var 
        btn.onclick = function(){
            // console.log($data);
            //创建请求对象
            // console.log(+$v+);
            // var xhr = new XMLHttpRequest();

            // //事件回调 xhr
            // xhr.onreadystatechange = function (){
            //     console.log(xhr.readyState);
            //     if (xhr.status == 200 && xhr.readyState == 4) {
            //         box.innerHTML = xhr.responseText;
            //     }
            // }
            // //请求初始化
            // xhr.open('get','<{:U('')}>',true);
           

            // //正式发送请求
            // xhr.send('a='+num1+'&b='+num2);
            }
        </script>
    </block>